<template>
    <div style="background-color: #5bc0de">
        <son @addCount="addCount"></son>
        <span>从子组件传过来的count:{{countFromSon}}</span>
    </div>
</template>

<script>
    import son from '@/components/son-father/son.vue';
    export default {
        name: "father",
        data(){
            return {
                countFromSon:0
            }
        },
        methods:{
            addCount(val){
                this.countFromSon=val;
            }
        },
        components:{son}
    }
</script>

<style scoped>

</style>
